<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:wpf="clr-namespace:MaterialDesignThemes.Wpf;assembly=MaterialDesignThemes.Wpf">

  <ResourceDictionary.MergedDictionaries>
    <ResourceDictionary Source="../Brushes/MaterialDesign/MaterialDesignTheme.Theme.xaml"/>
    <ResourceDictionary Source="MaterialDesignTheme.ToggleButton.xaml" />
    <ResourceDictionary Source="MaterialDesignTheme.ValidationErrorTemplate.xaml" />
  </ResourceDictionary.MergedDictionaries>

  <Style x:Key="FocusVisual">
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate>
          <Rectangle Margin="2" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="OptionMarkFocusVisual">
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate>
          <Rectangle Margin="14,0,0,0" SnapsToDevicePixels="true" Stroke="{DynamicResource {x:Static SystemColors.ControlTextBrushKey}}" StrokeThickness="1" StrokeDashArray="1 2"/>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>
  <Style x:Key="EllipseFocusVisual">
    <Setter Property="Control.Template">
      <Setter.Value>
        <ControlTemplate>
          <Grid>
            <Canvas>
              <Ellipse Fill="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Foreground}" Width="31" Height="31" Canvas.Left="-7" Canvas.Top="-5" Opacity="0.12"/>
            </Canvas>
          </Grid>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="MaterialDesignActionCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource MaterialDesignActionToggleButton}" />

  <Style x:Key="MaterialDesignActionLightCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource MaterialDesignActionCheckBox}">
    <Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueLightBrush}"/>
    <Setter Property="Foreground" Value="{DynamicResource PrimaryHueLightForegroundBrush}"/>
  </Style>

  <Style x:Key="MaterialDesignActionDarkCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource MaterialDesignActionCheckBox}">
    <Setter Property="Background" Value="{DynamicResource PrimaryHueDarkBrush}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueDarkBrush}"/>
    <Setter Property="Foreground" Value="{DynamicResource PrimaryHueDarkForegroundBrush}"/>
  </Style>

  <Style x:Key="MaterialDesignActionAccentCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource MaterialDesignActionCheckBox}">
    <Setter Property="Background" Value="{DynamicResource SecondaryAccentBrush}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource SecondaryAccentBrush}"/>
    <Setter Property="Foreground" Value="{DynamicResource SecondaryAccentForegroundBrush}"/>
  </Style>

  <Style x:Key="MaterialDesignCheckBox" TargetType="{x:Type CheckBox}">
    <Style.Resources>
      <Style x:Key="{x:Type TextBlock}" BasedOn="{StaticResource ControlContentTextblock}" TargetType="{x:Type TextBlock}"/>
    </Style.Resources>
    <Setter Property="FocusVisualStyle" Value="{StaticResource EllipseFocusVisual}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Background" Value="{DynamicResource MidContrastPrimaryBrush}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource MidContrastPrimaryBrush}"/>
    <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
    <Setter Property="Validation.ErrorTemplate" Value="{StaticResource MaterialDesignValidationErrorTemplate}"/>
    <Setter Property="Padding" Value="2,4"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type CheckBox}">
          <ControlTemplate.Resources>
            <Storyboard x:Key="Click">
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="48"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="48"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-24"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-24"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
              </DoubleAnimationUsingKeyFrames>
            </Storyboard>
          </ControlTemplate.Resources>
          <Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Viewbox Width="20" Height="20"  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                     FlowDirection="LeftToRight">
              <Canvas Width="24" Height="24">
                <wpf:PackIcon Kind="CheckboxBlankOutline"
                              x:Name="Graphic"
                              Foreground="{TemplateBinding Foreground}"
                              Opacity="0.53"
                              Width="{Binding Path=Width, RelativeSource={RelativeSource AncestorType={x:Type Canvas}}}"
                              Height="{Binding Path=Height, RelativeSource={RelativeSource AncestorType={x:Type Canvas}}}"
                              Margin="-2, 0"/>
                <Ellipse x:Name="InteractionEllipse" Fill="{TemplateBinding Foreground}" Width="0" Height="0" Canvas.Top="12" Canvas.Left="12" Opacity="0" RenderTransformOrigin="0.5,0.5"
                         IsHitTestVisible="False">
                  <Ellipse.RenderTransform>
                    <TransformGroup>
                      <ScaleTransform/>
                      <SkewTransform/>
                      <RotateTransform/>
                      <TranslateTransform/>
                    </TransformGroup>
                  </Ellipse.RenderTransform>
                </Ellipse>
              </Canvas>
            </Viewbox>
            <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="False" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
              <ContentPresenter.Resources>
                <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
                  <Setter Property="TextWrapping" Value="Wrap"/>
                </Style>
              </ContentPresenter.Resources>
            </ContentPresenter>
          </Grid>
          <ControlTemplate.Triggers>
            <EventTrigger RoutedEvent="ButtonBase.Click">
              <BeginStoryboard Storyboard="{StaticResource Click}"/>
            </EventTrigger>
            <!--<Trigger Property="HasContent" Value="true">
              <Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}"/>
            </Trigger>-->
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Opacity" Value="{StaticResource DisabledOpacity}"/>
            </Trigger>
            <Trigger Property="IsPressed" Value="true"/>
            <Trigger Property="IsChecked" Value="true">
              <Setter Property="Kind" TargetName="Graphic" Value="CheckboxMarked" />
              <Setter Property="Foreground" TargetName="Graphic" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}" />
              <Setter Property="Opacity" TargetName="Graphic" Value="1" />
            </Trigger>
            <Trigger Property="IsChecked" Value="{x:Null}">
              <Setter Property="Kind" TargetName="Graphic" Value="CheckboxIntermediate" />
            </Trigger>
            <Trigger Property="Validation.HasError" Value="true">
              <Setter Property="Foreground" TargetName="Graphic" Value="{DynamicResource ValidationErrorBrush}" />
              <Setter Property="Opacity" TargetName="Graphic" Value="1" />
              <Setter Property="Control.Foreground" TargetName="contentPresenter" Value="{DynamicResource ValidationErrorBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="MaterialDesignLightCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource MaterialDesignCheckBox}">
    <Setter Property="Background" Value="{DynamicResource PrimaryHueLightBrush}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueLightBrush}"/>
  </Style>

  <Style x:Key="MaterialDesignDarkCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource MaterialDesignCheckBox}">
    <Setter Property="Background" Value="{DynamicResource PrimaryHueDarkBrush}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource PrimaryHueDarkBrush}"/>
  </Style>

  <Style x:Key="MaterialDesignAccentCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource MaterialDesignCheckBox}">
    <Setter Property="Background" Value="{DynamicResource SecondaryAccentBrush}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource SecondaryAccentBrush}"/>
  </Style>

  <Style x:Key="MaterialDesignUserForegroundCheckBox" TargetType="{x:Type CheckBox}">
    <Style.Resources>
      <Style x:Key="{x:Type TextBlock}" BasedOn="{StaticResource ControlContentTextblock}" TargetType="{x:Type TextBlock}"/>
    </Style.Resources>
    <Setter Property="FocusVisualStyle" Value="{StaticResource EllipseFocusVisual}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
    <Setter Property="Validation.ErrorTemplate" Value="{StaticResource MaterialDesignValidationErrorTemplate}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type CheckBox}">
          <ControlTemplate.Resources>
            <Storyboard x:Key="Click">
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="48"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="48"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-24"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-24"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
              </DoubleAnimationUsingKeyFrames>
            </Storyboard>
          </ControlTemplate.Resources>
          <Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Viewbox Width="18" Height="18"  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                     FlowDirection="LeftToRight">
              <Canvas Width="24" Height="24">
                <Path x:Name="Graphic"
                      Data="M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3M19,5V19H5V5H19Z"
                      Fill="{TemplateBinding Foreground}"/>
                <Ellipse x:Name="InteractionEllipse" Fill="{TemplateBinding Foreground}" Width="0" Height="0" Canvas.Top="12" Canvas.Left="12" Opacity="0" RenderTransformOrigin="0.5,0.5"
                         IsHitTestVisible="False">
                  <Ellipse.RenderTransform>
                    <TransformGroup>
                      <ScaleTransform/>
                      <SkewTransform/>
                      <RotateTransform/>
                      <TranslateTransform/>
                    </TransformGroup>
                  </Ellipse.RenderTransform>
                </Ellipse>
              </Canvas>
            </Viewbox>
            <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="False" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
              <ContentPresenter.Resources>
                <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
                  <Setter Property="TextWrapping" Value="Wrap"/>
                </Style>
              </ContentPresenter.Resources>
            </ContentPresenter>
          </Grid>
          <ControlTemplate.Triggers>
            <EventTrigger RoutedEvent="ButtonBase.Click">
              <BeginStoryboard Storyboard="{StaticResource Click}"/>
            </EventTrigger>
            <Trigger Property="HasContent" Value="true">
              <!--<Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}"/>-->
              <Setter Property="Padding" Value="4,2,0,0"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Opacity" TargetName="Graphic" Value="{StaticResource DisabledOpacity}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true"/>
            <Trigger Property="IsChecked" Value="true">
              <Setter Property="Data" TargetName="Graphic" Value="M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z" />
            </Trigger>
            <Trigger Property="IsChecked" Value="{x:Null}">
              <Setter Property="Data" TargetName="Graphic" Value="M10,17L5,12L6.41,10.58L10,14.17L17.59,6.58L19,8M19,3H5C3.89,3 3,3.89 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V5C21,3.89 20.1,3 19,3Z" />
              <Setter Property="Opacity" TargetName="Graphic" Value="0.56"/>
            </Trigger>
            <Trigger Property="Validation.HasError" Value="true">
              <Setter Property="Fill" TargetName="Graphic" Value="{DynamicResource ValidationErrorBrush}" />
              <Setter Property="Control.Foreground" TargetName="contentPresenter" Value="{DynamicResource ValidationErrorBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

  <Style x:Key="{x:Type CheckBox}" BasedOn="{StaticResource MaterialDesignCheckBox}" TargetType="CheckBox"/>

  <Style x:Key="MaterialDesignVisibilityCheckBox" TargetType="{x:Type CheckBox}">
    <Setter Property="FocusVisualStyle" Value="{StaticResource EllipseFocusVisual}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Padding" Value="2,0,0,0"/>
    <Setter Property="VerticalContentAlignment" Value="Center"/>
    <Setter Property="Foreground" Value="{Binding RelativeSource={RelativeSource AncestorType={x:Type FrameworkElement}}, Path=(TextElement.Foreground)}"/>
    <Setter Property="Validation.ErrorTemplate" Value="{StaticResource MaterialDesignValidationErrorTemplate}"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type CheckBox}">
          <ControlTemplate.Resources>
            <Storyboard x:Key="Click">
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Width)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="48"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(FrameworkElement.Height)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="48"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.X)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-24"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.RenderTransform).(TransformGroup.Children)[3].(TranslateTransform.Y)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="-24"/>
              </DoubleAnimationUsingKeyFrames>
              <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="(UIElement.Opacity)" Storyboard.TargetName="InteractionEllipse">
                <EasingDoubleKeyFrame KeyTime="0" Value="0.3"/>
                <EasingDoubleKeyFrame KeyTime="0:0:0.3" Value="0"/>
              </DoubleAnimationUsingKeyFrames>
            </Storyboard>
          </ControlTemplate.Resources>
          <Grid x:Name="templateRoot" Background="Transparent" SnapsToDevicePixels="True">
            <Grid.ColumnDefinitions>
              <ColumnDefinition Width="Auto"/>
              <ColumnDefinition Width="*"/>
            </Grid.ColumnDefinitions>
            <Viewbox Width="18" Height="18"  VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
                     FlowDirection="LeftToRight">
              <Grid>
                <wpf:PackIcon x:Name="Eye" Kind="EyeOffOutline" Width="20" Height="20" VerticalAlignment="Center" HorizontalAlignment="Center" FlowDirection="LeftToRight"/>
                <Canvas Width="24" Height="24">
                  <Ellipse x:Name="InteractionEllipse" Fill="{TemplateBinding Foreground}" Width="0" Height="0" Canvas.Top="12" Canvas.Left="12" Opacity="0" RenderTransformOrigin="0.5,0.5"
                           IsHitTestVisible="False">
                    <Ellipse.RenderTransform>
                      <TransformGroup>
                        <ScaleTransform/>
                        <SkewTransform/>
                        <RotateTransform/>
                        <TranslateTransform/>
                      </TransformGroup>
                    </Ellipse.RenderTransform>
                  </Ellipse>
                </Canvas>
              </Grid>
            </Viewbox>
            <ContentPresenter x:Name="contentPresenter" Grid.Column="1" Focusable="False" HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" Margin="{TemplateBinding Padding}" RecognizesAccessKey="False" SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}" VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
              <ContentPresenter.Resources>
                <Style TargetType="{x:Type TextBlock}" BasedOn="{StaticResource {x:Type TextBlock}}">
                  <Setter Property="TextWrapping" Value="Wrap"/>
                </Style>
              </ContentPresenter.Resources>
            </ContentPresenter>
          </Grid>
          <ControlTemplate.Triggers>
            <EventTrigger RoutedEvent="ButtonBase.Click">
              <BeginStoryboard Storyboard="{StaticResource Click}"/>
            </EventTrigger>
            <Trigger Property="HasContent" Value="true">
              <!--<Setter Property="FocusVisualStyle" Value="{StaticResource OptionMarkFocusVisual}"/>-->
              <Setter Property="Padding" Value="4,2,0,0"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Opacity" TargetName="Eye" Value="{StaticResource DisabledOpacity}" />
            </Trigger>
            <Trigger Property="IsPressed" Value="true"/>
            <Trigger Property="IsChecked" Value="true">
              <Setter Property="Kind" TargetName="Eye" Value="Eye" />
            </Trigger>
            <Trigger Property="IsChecked" Value="{x:Null}">
              <Setter Property="Kind" TargetName="Eye" Value="EyeOutline" />
              <Setter Property="Opacity" TargetName="Eye" Value="0.56"/>
            </Trigger>
            <Trigger Property="Validation.HasError" Value="true">
              <Setter Property="Foreground" TargetName="Eye" Value="{DynamicResource ValidationErrorBrush}" />
              <Setter Property="Control.Foreground" TargetName="contentPresenter" Value="{DynamicResource ValidationErrorBrush}" />
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>

    <Style x:Key="MaterialDesignOutlinedContentCheckBox" TargetType="{x:Type CheckBox}" BasedOn="{StaticResource MaterialDesignOutlinedOverlayButton}">
    <Setter Property="SnapsToDevicePixels" Value="true"/>
    <Setter Property="OverridesDefaultStyle" Value="true"/>
    <Setter Property="Foreground" Value="{DynamicResource MidContrastPrimaryBrush}"/>
    <Setter Property="BorderBrush" Value="{DynamicResource MidContrastPrimaryBrush}"/>
    <Setter Property="BorderThickness" Value="1"/>
    <Setter Property="Template">
      <Setter.Value>
        <ControlTemplate TargetType="{x:Type CheckBox}">
          <Grid>
            <ContentPresenter
              x:Name="contentPresenter"
              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
              VerticalAlignment="{TemplateBinding VerticalContentAlignment}"
              RecognizesAccessKey="False"
              Margin="{TemplateBinding Padding}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}">
              <ContentPresenter.RenderTransform>
                <TranslateTransform X="60000" Y="60000" /> <!-- We use the content presenter as mask, render it offscreen -->
              </ContentPresenter.RenderTransform>
            </ContentPresenter>
            <Border Background="Transparent" x:Name="border" CornerRadius="2" BorderBrush="{TemplateBinding BorderBrush}" BorderThickness="{TemplateBinding BorderThickness}"/>
            <Grid x:Name="focusBackground" Background="{Binding Foreground, RelativeSource={RelativeSource TemplatedParent}, Converter={StaticResource BrushToTransmittantBrushConverter}, ConverterParameter=0.12}" Visibility="Collapsed"/>
            <Rectangle x:Name="rectangle" Fill="{TemplateBinding Foreground}" Width="{Binding ElementName=contentPresenter, Path=ActualWidth}" Height="{Binding ElementName=contentPresenter, Path=ActualHeight}">
              <Rectangle.OpacityMask>
                <VisualBrush TileMode="None" Stretch="None" Visual="{Binding ElementName=contentPresenter}"/>
              </Rectangle.OpacityMask>
            </Rectangle>
            <wpf:Ripple
              Focusable="False"
              HorizontalContentAlignment="{TemplateBinding HorizontalContentAlignment}"
              VerticalContentAlignment="{TemplateBinding VerticalContentAlignment}"
              RecognizesAccessKey="False"
              Padding="{TemplateBinding Padding}"
              SnapsToDevicePixels="{TemplateBinding SnapsToDevicePixels}"/>
          </Grid>
          <ControlTemplate.Triggers>
            <Trigger Property="IsFocused" Value="True">
              <Setter Property="Visibility" TargetName="focusBackground" Value="Visible"/>
            </Trigger>
            <Trigger Property="IsMouseOver" Value="true">
              <Setter Property="Background" TargetName="border" Value="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=Background}"/>
            </Trigger>
            <Trigger Property="IsChecked" Value="True">
              <Setter Property="Foreground" Value="{DynamicResource SecondaryAccentBrush}"/>
              <Setter Property="BorderBrush" Value="{DynamicResource SecondaryAccentBrush}"/>
            </Trigger>
			<Trigger Property="IsChecked" Value="{x:Null}">
              <Setter Property="Foreground" Value="{DynamicResource SecondaryAccentMiddleLightBrush}"/>
              <Setter Property="BorderBrush" Value="{DynamicResource SecondaryAccentMiddleLightBrush}"/>
            </Trigger>
            <Trigger Property="IsEnabled" Value="false">
              <Setter Property="Opacity" Value="{StaticResource DisabledOpacity}"/>
            </Trigger>
          </ControlTemplate.Triggers>
        </ControlTemplate>
      </Setter.Value>
    </Setter>
  </Style>


</ResourceDictionary>
